#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import get_angle_speed_torque_all
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    angle_speed_torque_list = dr.get_angle_speed_torque_all(id_list=data.id_list)
    if angle_speed_torque_list is None:
        pass
    else:
        print(angle_speed_torque_list)
    rospy.loginfo("get_angle_speed_torque_all_node")


def listener():
    rospy.init_node("get_angle_speed_torque_all", anonymous=True)
    rospy.Subscriber("get_angle_speed_torque_all", get_angle_speed_torque_all, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()
